package com.ctshk.rpc.scenic.service;


import com.ctshk.common.dto.Result;
import com.ctshk.common.model.PageResponse;
import com.ctshk.common.model.TokenUser;
import com.ctshk.rpc.scenic.dto.*;
import com.ctshk.rpc.scenic.dto.app.ScenicProductEsDTO;
import com.ctshk.rpc.scenic.req.*;

import java.math.BigDecimal;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 门票产品 服务类
 * </p>
 *
 * @author wangcy
 * @since 2021-02-02
 */
public interface IScenicProductService {


    PageResponse<ScenicProductListDTO> list(ScenicProductListReq scenicProductListReq, TokenUser currentUser);

    Result  modifyRecommendStatus(ScenicProductModifyRecommendStatusReq scenicProductModifyRecommendStatus, TokenUser currentUser);

    Integer queryUsageModeById(Long id);

    Result putAway(ScenicProductBatchSaleStrategyReq scenicProductModifyRecommendStatusReq, TokenUser currentUser);

    Result<ScenicStockDetailDTO> stockDetail(ScenicProductStockDetailReq scenicProductBatchSaleStrategyReq, TokenUser currentUser);

    Result<ScenicProductDetailDTO> scenicProductDetai(ScenicProductReq scenicProductReq) throws ParseException;

    Result<List<ScenicProductSaleStrategyDTO>> scenicProductEditDetai(ScenicProductEditReq scenicProductEditReq);

    Result scenicProductEdit(ScenicProductBatchSaleStrategyReq scenicProductModifyRecommendStatusReq, TokenUser currentUser);

    Result<List<ScenicProductListDTO>> scenicProductList(ScenicProductReq scenicProductReq);

    Result<ScenicProductTicketDTO>  scenicProductTicketPrice(ScenicProductTicketReq scenicProductTicketReq);

    Result<ScenicProductDetailByIdDTO> scenicProductDetailByIdDTO(ScenicProductDetailReq scenicProductDetailReq);

    Result<ScenicProductTicketDetailDTO>  scenicProductTicketDetail(ScenicProductTicketDetailReq scenicProductTicketDetailReq);

    Result modifyProductTicket(List<ScenicProductTicketListReq> scenicProductTicketListReqList,TokenUser tokenUser);

    Result<ScenicProductReceiptDTO> scenicProductDetail(ScenicProductDetailReq scenicProductDetailReq);

    List<ScenicProductPriceListDTO> scenicProductPriceList(ScenicProductPriceListReq scenicProductPriceListReq);

    Result<ScenicProductPriceListDTO> scenicProductPriceDetail(ScenicProductPriceDetailReq scenicProductPriceDetailReq , TokenUser tokenUser);

     /**
     * 拉取产品信息
     * @return 返回值
     */
    Result saveScenicProduct(TokenUser user);


    /**
     * 获取产品库存数据
     * @return 返回值
     */
    Result<StockData> getProductStockChimeLong(ChimeLongProductPriceAndStockReq req);

     /**
     * 拉取产品价格日历
     * @return 返回值
     */
     Result saveScenicProductPrice(ChimeLongProductPriceAndStockReq req,TokenUser user);


    /**
     * 长隆订单创建
     * @return 返回值
     */
    Result chimeLongOrderCreate(ChimeLongCreateOrderPreDTO chimeLongCreateOrderPreDTO, TokenUser user);

    /**
     * 长隆取消订单
     * @param chimeLongIdOrOtaId
     * @param user
     */
    public Result chimeLongOrderCancel(String chimeLongIdOrOtaId, TokenUser user);

    /**
     * 根据ids查询
     * @return 返回值
     */
    Result<List<ScenicProductListDTO>> getListByIds(ScenicProductListReq scenicProductListReq);

    /**
     * 根据id查询
     * @return 返回值
     */
    Result<ScenicProductListDTO> queryById(Long id);

    Result<List<ScenicProductListDTO>> queryList(String ids);

    /**
     * 查询ES缓存需要的产品列表数据
     * @return
     */
    Result<List<ScenicProductEsDTO>> queryListByEs();

    /**
     * 查询所有景点门票信息作为ES缓存
     * @return
     */
    Result<List<ScenicProductEsDTO>> queryListByEsAll();


    /**
     * 查询ES缓存需要的产品列表数据
     * @param gmtModified 更新时间
     * @return
     */
    Result<List<ScenicProductEsDTO>> queryListByEsAndGmtModified(String gmtModified);

    /**
     * 根据产品ID 查询渠道信息
     * @param productId
     * @return
     */
    List<ScenicProductChannelOnlineSelfPlatformDTO> queryListByProductId(Long productId);

    /**
     * 根据产品列表查询价格并设置到ScenicPrice字段中
     * @param scenicProductEsDTOS
     * @return
     */
    List<ScenicProductEsDTO> queryProductPriceByScenicProductEsList(List<ScenicProductEsDTO> scenicProductEsDTOS);

    /**
     * 根据产品id查询其代理商列表信息
     * @param productId
     */
    Result<List<ScenicProductChannelOfflineAgentCustomDTO>> getAgentListByProductId(Long productId, String stockId, TokenUser tokenUser,String name);


    /**
     * 定时任务同步景点门票
     * @return
     */
    Result synTaskScenicByEs();

}
